import React, { Component, createRef } from "react";

class App extends Component {
  state = {};

  file = createRef();

  handleClick = () => {
    console.log(this.file.current.files[0]);
  };

  render() {
    return (
      <>
        <input type="file" ref={this.file} multiple />

        <button onClick={this.handleClick}>btn</button>
      </>
    );
  }
}

export default App;
